package org.kabeja.parser;

/**
 * @author shutao
 * @since 2022/4/25 10:44
 */
public final class DXFValue {
    private String value;
    private int integerValue = 2147483647;

    public DXFValue() {
    }

    public DXFValue(String var1) {
        this.setValue(var1);
    }

    public String getValue() {
        return this.value;
    }

    private void setValue(String var1) {
        this.value = var1.trim();
    }

    public double getDoubleValue() {
        return Double.parseDouble(this.value);
    }

    public int getIntegerValue() {
        return Integer.parseInt(this.value);
    }

    public boolean getBooleanValue() {
        return this.getIntegerValue() == 0;
    }

    @Override
    public String toString() {
        return this.value;
    }

    public boolean isBitSet(int var1) {
        if (this.integerValue == 2147483647) {
            this.integerValue = this.getIntegerValue();
        }

        return (this.integerValue & var1) == var1;
    }
}

